Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <body ononline="onFunction()" onoffline="offFunction()"> <p>Open the File menu and click on "Work Offline" to toggle between working online and offline.</p> <p><strong>Note:</strong> The ononline and onoffline events are only supported in Firefox and Internet Explorer version 8 to 10.</p> <script> function onFunction() { alert ("Your browser is working online."); } function offFunction() { alert ("Your browser is working offline."); } </script> </body> <!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_ononline by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 08:30:30 GMT --> </html>
Result:
Try it Yourself - © w3schools.com